package com.kaoshi;

/**
 * @author xiyu
 * @version 1.0
 * @date 2025/3/25 9:19
 * @description
 */
public class getzhishu {
    public static void main(String[] args) {
        int count = 0;//定义计数器
        for (int i = 2; i < 101; i++) {
            boolean flag = true;
            for (int j = 2; j <= i-1; j++) {
                if (i%j==0){
                    flag = false;
                }
            }
            if (flag){
                System.out.print(i+" ");
                count++;
            }
        }
        System.out.println("1-100之间的质数有"+ count+"个");
    }
}
